home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!news
- From: jlilley@ix.netcom.com (John Lilley)
- Newsgroups: comp.lang.c++
- Subject: Re: Is it OK to delete const *type pointers?
- Date: 30 Mar 1996 23:41:16 GMT
- Organization: Netcom
- Message-ID: <4jkgqs$i4b@dfw-ixnews6.ix.netcom.com>
- References: <4jhjub$fpc@mag1.magmacom.com>
- NNTP-Posting-Host: den-co15-25.ix.netcom.com
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-NETCOM-Date: Sat Mar 30 5:41:16 PM CST 1996
- X-Newsreader: WinVN 0.99.7
-
- In article <4jhjub$fpc@mag1.magmacom.com>, ezust@mag1.magmacom.com says...
- >Some compilers let me do this, others do not. What I would like to know is,
- >what does Stroustrup think? I.e. is it written somewhere in the ARM (I checked
- >but can't find it) or in the draft standard? If somoene could e-mail me a
- >quote or a pointer to a place where I can read where it says such a thing
- >should or should not be allowed, I would appreciate it!
- >
- >const int* array= new int[30];
- >delete[] array;
-
- The ARM says that it is valid to call the destructor for a const object.
- This implies to me that it should also be legal to delete it. However,
- I cannot find that explicitly stated.
-
- john lilley
-
-